
<!DOCTYPE html>
<html>
<head>
	<title>TODO supply a title</title>
	<meta charset="UTF-8">
	<meta name="viewport" content="width=device-width">
	<script src="../min/avalon.min.js"></script>
</head>

<body>

	<div ms-controller="list">
		<span ms-mouseover="changeUl(1)">公告</span>
		<span ms-mouseover="changeUl(0)">媒体报道</span>
		<a ms-href="'#!/'+ more_name">{{more_text}}</a>
		<ul>
			<li ms-repeat="infoList">
				<a ms-href="'#!/'+ more_name + '/' + el.id" ms-attribute="el.title">{{el.title}}</a>
			</li>
		</ul>
	</div>


	<div>TODO write content</div>
	<script type="text/javascript">

		var gg=[{"id":"1","title":"公告文章标题1"},{"id":"2","title":"公告文章标题2"},{"id":"3","title":"公告文章标题3"},{"id":"4","title":"公告文章标题4"}];
		var bd=[{"id":"1","title":"媒体报道文章标题1"},{"id":"2","title":"媒体报道文章标题2"},{"id":"3","title":"媒体报道文章标题3"},{"id":"4","title":"媒体报道文章标题4"}];

	</script>
	<script type="text/javascript">
		var vm = avalon.define({
			$id: "list",
			more_name: "gg",
			more_text: "更多公告",
			gg:gg,
			bd:bd,
			infoList:gg,
			changeUl:function(flag){
				console.table(gg);
		      	if(flag){  //鼠标移过“公告”选项卡头部
		      		vm.more_name = "gg";
		      		vm.more_text = "更多公告";
		      		vm.infoList = vm.gg;
		      	}else{  //鼠标移过“媒体报道”选项卡头部
		      		vm.more_name = "abd";
		      		vm.more_text = "更多报道";
		      		vm.infoList = vm.bd;
		      	}
		      }
		  });

        avalon.scan(); //要在最后加这一句，让avalon扫描文档，从而执行起来
    </script>

</body>
</html>


